<?php get_template_part('templates/head'); ?>
<body <?php body_class(); ?>>
<div class="body-wrapper">

<?php if(!is_404()):?>
	<?php do_action('get_header'); ?>
		<?php get_template_part('templates/header'); ?>

		<section id="main" role="document">
			<div class="container">
				<?php if (is_active_sidebar_YA('above-main')) { ?>
					<div class="row">
						<div class="sidebar-above-main">
							<?php dynamic_sidebar('above-main'); ?>
						</div>
					</div>
				<?php } ?>
			</div>
		</section>
		<section class="above-content" role="document">
			<div class="container">
				<?php if (is_active_sidebar_YA('above')) { ?>
							<div class="sidebar-above">
								<?php dynamic_sidebar('above'); ?>
							</div>
				<?php } ?>
			</div>
		</section>	
		<section id="main below" role="document">	
			<div class="container">
				<div class="row">
					<?php 
					if ($left_sidebars = ya_sidebar_left())
						foreach ($left_sidebars as $sidebar)
							get_template_part('templates/sidebar', $sidebar);
					?>
					
					<section id="contents" <?php ya_content_class(); ?> role="main">
						<?php include ya_template_path(); ?> 
						
						<?php if (is_active_sidebar_YA('below')) { ?>
							<div class="sidebar-below">
								<?php dynamic_sidebar('below'); ?>
							</div>
						<?php } ?>
						
					</section>
					
					<?php
					if ($right_sidebars = ya_sidebar_right())
						foreach ($right_sidebars as $sidebar)
						get_template_part('templates/sidebar', $sidebar);
					?>
				</div>
				<?php if (is_active_sidebar_YA('below-main')) { ?>
					<div class="sidebar-below-main">
						<div class="row">
							<?php dynamic_sidebar('below-main'); ?>
						</div>
					</div>
				<?php } ?>
			</div>
		</section>
	<?php if (is_active_sidebar_YA('floating') ){ ?>
		<div class="floating">
			<?php dynamic_sidebar('floating');  ?>
		</div>
	<?php } ?>
	<?php get_template_part('templates/footer'); ?>
	
	<?php wp_footer(); ?>
	<?php else :?>
	<?php get_template_part('404');?>
	<?php endif;?>
	
	</div>
</body>
</html>